﻿using ElevatorApplication.Extensions;

namespace ElevatorApplication
{
    public class StoppedState : IElevatorState
    {
        private readonly IElevator _elevator;

        public StoppedState(IElevator elevator)
        {
            _elevator = elevator;
        }

        public void Running()
        {
            if (_elevator.IsHigherFloorButtonBePushed())
            {
                var state = new UpRunningElevatorState(_elevator);
                _elevator.ChangeSate(state);
            }

            //if (IsClickedInLowFloor())
            //{
            //    var state = new DownRunningElevatorState(_elevator);
            //    _elevator.ChangeSate(state);
            //}
        }

        private bool IsClickedInHighFloor()
        {
            return true;
        }

        private bool IsClickedInLowFloor()
        {
            return true;
        }
    }
}